package com.lyncs.ods.resp;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author alex
 * @date 2022/2/5 22:13
 * @description
 */
@Data
@Accessors(chain = true)
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class SkuInfoResp {

    @ApiModelProperty(value = "sku的id")
    private Long skuId;

    @ApiModelProperty(value = "spu的id")
    private Long spuId;

    @ApiModelProperty(value = "sku单位")
    private String unit;

    @ApiModelProperty(value = "sku名称")
    private String name;

    @ApiModelProperty(value = "内部货号")
    private String innerCode;

    @ApiModelProperty(value = "货币")
    private String currency;

    @ApiModelProperty(value = "金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "sku 图片地址")
    private String imgUrl;

    @ApiModelProperty(value = "sku 属性信息")
    private Map<String, String> skuAttrs;

    @Data
    @Accessors(chain = true)
    @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
    public static class SkuAttr {

        @ApiModelProperty(value = "sku属性名称")
        private String name;

        @ApiModelProperty(value = "sku属性值")
        private String value;
    }
}
